<?php

/**
 * Performs a logout, generates and prints the view for the result
 */
function logout(){
	if(SessionManager::stopSession()){
		$res = new ResultJSON(false, '', '');
		echo $res->renderView();
	} else {
		$res = new ResultJSON(true, session_id(), SessionManager::getLastError());
		echo $res->renderView();
	}
}

?>